/**
 * @ author: 汪孟苹
 */
define(["jquery","template",
	"scprit/followup/app/patientManager/addPatientTreatment.servers.js",
	"scprit/followup/template/patientManager/addPatientTreatment.tpl.js"],
	function($,template,$addPatientServers,tpl){
	var addPatientUi = {};

	var drawQueues = function(data){
		return template("tpl_addPatient_queues",data);
	}
	var drawTit = function(data){
		return template("tpl_addPatient_tit",data);
	}
	var drawScheme = function(data){
		return template("tpl_addPatient_scheme",data);
	}
	
	addPatientUi.queues = function(options){
		var data = {
			rows: $addPatientServers.handleQueues(options.list)
		}
		$("#"+options.id).html(tpl.queues());
		var h = drawQueues(data);
		$("#"+options.id).html(h);
	}
	addPatientUi.tit = function(options){
		$("#"+options.id).html(tpl.tit());
		var h = drawTit(options);
		$("#"+options.id).html(h);
	}
	addPatientUi.scheme = function(options){
		$("#"+options.id).html(tpl.scheme());
		var h = drawScheme($addPatientServers.handleScheme(options));
		$("#"+options.id).html(h);
	}
	
	return addPatientUi;
});